library MachinegunnerConcentration initializer init 

	private function MGUpgradeConditions takes nothing returns boolean
		return GetLearnedSkill() == 'A005'
	endfunction
	
	private function MGUpgrades takes nothing returns nothing
		local integer i = GetLearnedSkill()
		local player p = GetTriggerPlayer()
		local unit u = GetTriggerUnit()
		call SetPlayerTechResearched(p,'R009',GetPlayerTechCount(p,'R009',true)+1)
		set u = null
		set p = null
	endfunction

	private function init takes nothing returns nothing
		local trigger t
		set t = CreateTrigger()
		call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_HERO_SKILL )
		call TriggerAddCondition(t,Condition(function MGUpgradeConditions))
		call TriggerAddAction(t,function MGUpgrades)
	endfunction


	
endlibrary